import { createSlice, PayloadAction } from '@reduxjs/toolkit';

interface ArrState {
  sarr: number[];
}

const initialState: ArrState = {
  sarr: [],
};

const arrSlice = createSlice({
  name: 'handleArr',
  initialState,
  reducers: {
    sarrPush(state, action: PayloadAction<number>) {
      state.sarr.push(action.payload);
    },
  },
});

export const { sarrPush } = arrSlice.actions;
export default arrSlice.reducer;
